From: junjie zhang Date: Fri, 28 Feb 2025 11:05:28 +0000 (+0800) Subject: luci-app-filemanager: fixed time parsing X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=e4bfd608bd24ad3df00ebdf90f4de14d91db3fb8;p=project%2Fluci.git luci-app-filemanager: fixed time parsing Signed-off-by: junjie zhang --- diff --git a/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js b/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js index 717e32eac4..27eca84934 100644 --- a/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js +++ b/applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js @@ -298,7 +298,7 @@ function getFileList(path) { lines.forEach(function(line) { if (line.startsWith('total') || !line.trim()) return; // Parse the output line from 'ls' command - var parts = line.match(/^([\-dl])[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Tt]{1}\s+\d+\s+(\S+)\s+(\S+)\s+(\d+)\s+([\d\-]+\s+[\d\:\.]{8,12}\s+[+-]\d{4})\s+(.+)$/); + var parts = line.match(/^([\-dl])[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Tt]{1}\s+\d+\s+(\S+)\s+(\S+)\s+(\d+)\s+([\d\-]+\s+\d{2}:\d{2}:\d{2}(?:\.\d+)?\s+[+-]\d{4})\s+(.+)$/); if (!parts || parts.length < 7) { console.warn('Failed to parse line:', line); return;